<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>事件监听</title>
</head>
<body>
<ul id="no">
    <li><button onclick="login1()" value="1">1</button></li>
    <li><button  id="2" onclick="login2()" value="2">2</button></li>
    <li><button  id="3" onclick="login3()" value="3">3</button></li>
    <li><button  id="4" onclick="login4()" value="4">4</button></li>
    <li><button  id="5" onclick="login5()" value="5">5</button></li>
    <li><button  id="6" onclick="login6()" value="6">6</button></li>
    <li><button  id="7" onclick="login7()" value="7">7</button></li>
</ul>
<script>
    function login1() {
       alert(1);
    }// write your code here
    function login2() {
        alert(document.getElementById("2").value);
    }// write your code here
    function login3() {
        alert(3);
    }// write your code here
    function login4() {
        alert(4);
    }// write your code here
    function login5() {
        alert(5);
    }// write your code here
    function login6() {
        alert(6);
    }// write your code here
    function login7() {
        alert(7);
    }// write your code here

</script>
</body>
</html>